﻿// PMActiveXPropPage.cpp : CPMActiveXPropPage 属性页类的实现。

#include "stdafx.h"
#include "PMActiveX.h"
#include "PMActiveXPropPage.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

IMPLEMENT_DYNCREATE(CPMActiveXPropPage, COlePropertyPage)

// 消息映射

BEGIN_MESSAGE_MAP(CPMActiveXPropPage, COlePropertyPage)
END_MESSAGE_MAP()

// 初始化类工厂和 guid

IMPLEMENT_OLECREATE_EX(CPMActiveXPropPage, "MFCACTIVEXCONT.PMActiveXPropPage.1",
	0x43be26f5,0x2d9a,0x4b9c,0xbc,0x55,0xdf,0xaf,0xf8,0xd1,0xd8,0x0c)

// CPMActiveXPropPage::CPMActiveXPropPageFactory::UpdateRegistry -
// 添加或移除 CPMActiveXPropPage 的系统注册表项

BOOL CPMActiveXPropPage::CPMActiveXPropPageFactory::UpdateRegistry(BOOL bRegister)
{
	if (bRegister)
		return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
			m_clsid, IDS_PMACTIVEX_PPG);
	else
		return AfxOleUnregisterClass(m_clsid, nullptr);
}

// CPMActiveXPropPage::CPMActiveXPropPage - 构造函数

CPMActiveXPropPage::CPMActiveXPropPage() :
	COlePropertyPage(IDD, IDS_PMACTIVEX_PPG_CAPTION)
{
}

// CPMActiveXPropPage::DoDataExchange - 在页和属性间移动数据

void CPMActiveXPropPage::DoDataExchange(CDataExchange* pDX)
{
	DDP_PostProcessing(pDX);
}

// CPMActiveXPropPage 消息处理程序
